package com.itheima.spring.bestpractive.service.impl;

import com.itheima.spring.bestpractive.mapping.DepartmentMapping;
import com.itheima.spring.bestpractive.pojo.Department;
import com.itheima.spring.bestpractive.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author: HZY
 * @date: 2025/6/27 21:43
 * @Content:
 */
@Service
public class DepartmentImpl implements DepartmentService {
    @Autowired
    private DepartmentMapping departmentMapping;
    @Override
    public void addDepartment(List<Department> departments) {
        departmentMapping.insertDepartment(departments);
    }

    @Override
    public List<Department> getAllDepartment() {
        return departmentMapping.getAllDepartment();
    }
}
